package cn.iocoder.yudao.module.brokerage.user.convert;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.api.brokerage.user.vo.BrokerageUserVO;
import cn.iocoder.yudao.module.brokerage.user.pojo.po.BrokerageUserDO;
import cn.iocoder.yudao.module.brokerage.user.pojo.vo.AdminBrokerageUserVO;
import cn.iocoder.yudao.module.brokerage.user.pojo.vo.AppBrokerageUserVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * <pre>
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 *  这里是文件说明
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * </pre>
 *
 * @author 山野羡民（1032694760@qq.com）
 * @since 2025/01/22
 */
@Mapper
public interface BrokerageUserConvert {

    BrokerageUserConvert INSTANCE = Mappers.getMapper(BrokerageUserConvert.class);

    @Mapping(target = "grandpaUser", ignore = true)
    @Mapping(target = "fatherUser", ignore = true)
    @Mapping(target = "user", ignore = true)
    AppBrokerageUserVO convert(BrokerageUserDO bean);

    BrokerageUserVO convert(AppBrokerageUserVO bean);

    BrokerageUserVO convert2(BrokerageUserDO bean);

    List<AppBrokerageUserVO> convertList(List<BrokerageUserDO> list);

    List<AdminBrokerageUserVO> convertList2(List<BrokerageUserDO> list);

    PageResult<AppBrokerageUserVO> convertPage(PageResult<BrokerageUserDO> page);

}
